<?php

use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;

class User extends Eloquent implements UserInterface, RemindableInterface
{

    use UserTrait, RemindableTrait;

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'users';

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = array('password', 'remember_token');
    protected $guarded = array();

    /**
     * 获取指定列数据，默认获取所有列
     * @param array $columns
     * @return array|static[]
     */
    public static function getInfo($use_id, $columns = array('*'))
    {
        return DB::table('users')
            ->where('id', $use_id)
            ->select($columns)
            ->get();
    }

}
